import random
# 产生一个随机数，将它转换为二进制数,作为亮灯情况
# 100000000000 -- 111111111111
num1 = random.randint(2048, 4095)
# bin(num1)
# print(bin(num1))
# x = bin(num1)
y = bin(num1)[2:]
print(y)
i = random.choice([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
print("你打中了第%d个灯"%(i+1))
if int(y[i]) == 1:
    print("你赢了！")
else:
    print("你输了！")